<%-- 
    Document   : nav
    Created on : 2011-11-18, 11:24:51
    Author     : EnzoZhong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<style>
	ul.navlist{
		list-style-type: none;
		width: 160px;
	}

	ul.navlist li {
		text-align: center;
		padding: 3px;
		margin: 8px;
		border-radius: 6px;
		opacity : 0.8;
		background-color: black;
		color: white;
	}

	ul.navlist li a{
		color: white;
	}
</style>

<script>
	$().ready(function(){
		$("#navlist").css("position","fixed");
                
		var maxTop = d($(".essay")[0]).top;
		var isIn;
                
		$("#navlist").hover(function(){
			isIn = true;
		}, function(){
			isIn= false;
		});
                
		$(document).mousemove(function(e){
			var h = d("#navlist").height;
			var y = e.pageY - $(window).scrollTop();
			setTimeout(function(){
				if(!isIn){
					if(y - h / 2 < maxTop && $(window).scrollTop() == 0){
						y = maxTop + h / 2;
					}
					$("#navlist").css("top",y - h / 2);
				}
			},123);
		});
        
		$("#zero").click(function(){
			$("html,body").animate({
				scrollTop : 0
			}, 668);
		});
      
	});
</script>

<ul id="navlist" class="navlist">
	<li>

	</li>
	<li>
		<a href="/-_-">所有文章</a>
	</li>
	<li>
		<a href="/2login">图集</a>
	</li>
	<li>
		<a href="/2login">管理</a>
	</li>
	<li id="zero">
		<a>Top</a>
	</li>
</ul>
